home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00a.txt
/
000068_icon-group-sender _Mon Apr 17 07:41:15 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id HAA28574
for icon-group-addresses; Mon, 17 Apr 2000 07:39:46 -0700 (MST)
Message-Id: <200004171439.HAA28574@baskerville.CS.Arizona.EDU>
From: "F.G. van DORP" <F.G.van.Dorp@digimedia.nl>
X-Newsgroups: comp.lang.icon
Subject: Re: Reversible assignment really reversible ?
X-Newsreader: Forte Agent 1.7/32.534
Date: Sat, 15 Apr 2000 17:43:15 GMT
X-Complaints-To: abuse@chello.nl
X-Trace: nlnews00.chello.com 955820595 212.187.67.243 (Sat, 15 Apr 2000 16:43:15 GMT)
To: icon-group@optima.CS.Arizona.EDU
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
On 10 Apr 2000 16:06:19 -0400, "Frank J. Lhota"
<NOSPAM.Frank.Lhota@lexma.meitech.com> wrote:
>Yes, reversible assignment really is implemented. The problem is due to two
>flaws in your test.
>
>First of all, when a local variable is used in a co-expression,
>...
Important lesson learnt: don't mess around with co-expressions, especially when
"not really necessary".
Although I appreciate all replies explaining the pitfalls of co-expressions
(maybe someone could also explain the INFIX @-operator, I always wondered
about that one too), I'm still puzzled by the implementation of reversible
assignment.
#------------------------------------------------------------------------------
procedure revass(a,b) # pardon the expression
local c
c:=a
suspend ((a:=b) | ((a:=c) & (&fail)))
end ######
#------------------------------------------------------------------------------
procedure myrevass(a,b)
local c
c:=a
suspend ((a:=b) | ((a:=c) )) # &(&fail)))
end #######
#------------------------------------------------------------------------------
Which considerations (if any ;-) led to picking the first
implementation ?
Thanks again.